package com.qiji.video.service;

import com.github.pagehelper.PageInfo;
import com.qiji.video.bean.BrowsingHistory;
import com.qiji.video.bean.Collection;
import com.qiji.video.bean.Comments;
import com.qiji.video.bean.Users;
import com.qiji.video.bean.dto.UserDto;
import com.qiji.video.exception.ServiceException;

import javax.mail.MessagingException;
import java.util.List;

public interface IUserService {
    // 用户登录
    Users userLogin(String username,String password) throws ServiceException;
    // 根据请求头id查询个人信息
    Users selectUser(Integer id);
    // 根据请求头手机号验证密码后修改密码
    int updatePwdByPhone(Users users) throws ServiceException;
    // 根据邮箱验证修改密码
    int updatePwdByEmail(String email,String password,String verificationCode) throws ServiceException;
    // 根据请求头id 查询观看历史
    PageInfo<BrowsingHistory> selectBhByUid(Integer uid, Integer page, Integer size);
    // 根据请求头id 查询评论历史
    PageInfo<Comments> selectByVid(Integer vid,Integer page,Integer size);
    // 根据请求头id 查询电影收藏
    PageInfo<Collection> selectCollectByUid(Integer uid,Integer page,Integer size);
    // 根据请求头id 修改个人信息
    int updateInfoSelective(UserDto users) throws ServiceException;

    boolean sendEmail(String email) throws MessagingException;
}
